Skip to content

[Chore] Upgrade docs to Ruby 4.0.10 (fixes CI on ubuntu-26.04) - #676

Merged
cirdes merged 2 commits into
mainfrom
chore/ruby-4.0
Nov 22, 2026
Merged

cirdes merged 2 commits into
mainfrom
chore/ruby-4.0

Conversation

@cirdes

@cirdes cirdes commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Why

ubuntu-latest now resolves to ubuntu-26.04, and ruby/setup-ruby only builds the latest patch of each Ruby series for that image. docs/.ruby-version pinned 3.4.7, so the Docs (Rails) job has failed at "Set up Ruby" since 2026-11-18, on main and on every Dependabot PR (#672, #673, #674, #675):

Error: Unavailable version 3.4.7 for ruby on ubuntu-26.04

What changes

  • docs runs on Ruby 4.0.10, the current release: .ruby-version, Dockerfile (fullstaq 4.0.10-jemalloc-slim) and Gemfile.lock.
  • docs/Gemfile declares ruby "~> 4.0.0" instead of an exact patch. The exact version lives in .ruby-version, so the next patch bump doesn't have to touch the Gemfile, and a devcontainer one patch behind can still bundle install.
  • Both devcontainers move to 4.0.9. ghcr.io/rails/devcontainer/images/ruby hasn't published 4.0.10 yet.
  • CI tests the gem, mcp and audit on Ruby 4.0 as well as 3.3 and 3.4, since the docs app now runs the gem on 4.0.
  • gem/.tool-versions and audit/.tool-versions go to 4.0.10.
  • Two rake tasks drop require "pathname". Pathname is core in Ruby 4.0 and standardrb flags the require as redundant.

Testing

Run locally on Ruby 4.0.10:

  • docs: bin/rails db:test:prepare test (76 runs, 0 failures) and bundle exec standardrb (clean)
  • gem: bundle exec rake (796 runs, 0 failures, standardrb clean)
  • audit: bundle exec rake (288 runs, 0 failures)
  • mcp: tests pass. rake standard reports two pre-existing Layout/EmptyLineAfterMagicComment offenses that CI doesn't run and that aren't related to this change.

After merge, comment @dependabot rebase on #672–#675 to rerun their CI.

🤖 Generated with Claude Code


Summary by cubic

Fixes the docs (Rails) CI job, which has failed at the Set up Ruby step since ubuntu-latest moved to ubuntu-26.04, where ruby/setup-ruby only ships the latest patch of each Ruby series.

  • Upgrades the docs app and audit tooling to Ruby 4.0.10; devcontainers use 4.0.9, the newest published image.
  • Changes docs/Gemfile to ruby "~> 4.0.0" so future patch bumps only touch .ruby-version and the Dockerfiles.
  • Adds Ruby 4.0 to the gem, mcp, and audit CI matrices and updates the matrix description in README.md and CLAUDE.md.
  • Removes the now-redundant require "pathname" from two rake tasks, since Pathname is core in Ruby 4.0.

Written for commit 8a683c3. Summary will update on new commits.

View guided diff Turn on auto-fix

ubuntu-latest moved to ubuntu-26.04, where ruby/setup-ruby only ships the
latest patch of each series. docs/.ruby-version pinned 3.4.7, so the
Docs (Rails) job failed before running anything, on main and on every
Dependabot PR.

- docs: Ruby 4.0.10 (.ruby-version, Dockerfile, Gemfile.lock)
- docs/Gemfile: `ruby "~> 4.0.0"` so a patch bump only touches
  .ruby-version and the Dockerfiles
- devcontainers: 4.0.9, the newest tag of ghcr.io/rails/devcontainer/images/ruby
- CI: add Ruby 4.0 to the gem, mcp and audit matrices
- drop `require "pathname"` from two rake tasks (core in Ruby 4.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cirdes cirdes self-assigned this Nov 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/ci.yml">

<violation number="1" location=".github/workflows/ci.yml:19">
P3: The gem matrix now includes Ruby 4.0, but `CLAUDE.md` (line 15) and `README.md` (line 35) still say the gem CI runs on Ruby 3.3 + 3.4. Update those descriptions to include 4.0 so the docs match the workflow.</violation>
</file>

<file name="docs/.devcontainer/Dockerfile">

<violation number="1" location="docs/.devcontainer/Dockerfile:2">
P3: This pin is intentionally one patch behind `docs/.ruby-version` (4.0.10) until the 4.0.10 devcontainer image is published, but the comment above it still says it must match. Update the comment to note the deliberate lag and when to revert it, so the next maintainer doesn't "fix" it or treat the mismatch as a mistake.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/ci.yml
fail-fast: false
matrix:
ruby: ["3.3", "3.4"]
ruby: ["3.3", "3.4", "4.0"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The gem matrix now includes Ruby 4.0, but CLAUDE.md (line 15) and README.md (line 35) still say the gem CI runs on Ruby 3.3 + 3.4. Update those descriptions to include 4.0 so the docs match the workflow.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/ci.yml, line 19:

<comment>The gem matrix now includes Ruby 4.0, but `CLAUDE.md` (line 15) and `README.md` (line 35) still say the gem CI runs on Ruby 3.3 + 3.4. Update those descriptions to include 4.0 so the docs match the workflow.</comment>

<file context>
@@ -16,7 +16,7 @@ jobs:
       fail-fast: false
       matrix:
-        ruby: ["3.3", "3.4"]
+        ruby: ["3.3", "3.4", "4.0"]
     steps:
       - uses: actions/checkout@v7
</file context>

@@ -1,5 +1,5 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.4.7
ARG RUBY_VERSION=4.0.9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This pin is intentionally one patch behind docs/.ruby-version (4.0.10) until the 4.0.10 devcontainer image is published, but the comment above it still says it must match. Update the comment to note the deliberate lag and when to revert it, so the next maintainer doesn't "fix" it or treat the mismatch as a mistake.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/.devcontainer/Dockerfile, line 2:

<comment>This pin is intentionally one patch behind `docs/.ruby-version` (4.0.10) until the 4.0.10 devcontainer image is published, but the comment above it still says it must match. Update the comment to note the deliberate lag and when to revert it, so the next maintainer doesn't "fix" it or treat the mismatch as a mistake.</comment>

<file context>
@@ -1,5 +1,5 @@
 # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
-ARG RUBY_VERSION=3.4.7
+ARG RUBY_VERSION=4.0.9
 FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
 
</file context>
Suggested change
ARG RUBY_VERSION=4.0.9
# Intentionally one patch behind .ruby-version (4.0.10) until the 4.0.10 devcontainer image is published; revert to match once it is.
ARG RUBY_VERSION=4.0.9

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 existing issue remains and 3 new issues found across 13 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="gem/.tool-versions">

<violation number="1" location="gem/.tool-versions:1">
P2: `gem/.ruby-version` still pins 3.3.3, so this update leaves conflicting default Ruby pins in `gem/`. Update `.ruby-version` to the intended version as part of this change.</violation>
</file>

<file name="audit/.tool-versions">

<violation number="1" location="audit/.tool-versions:1">
P3: This pin moves the audit toolchain to Ruby 4.0.10, but `audit/README.md` still lists Ruby 3.4 as the prerequisite in the Commands and Prerequisites sections. Update those references to 4.0 so setup instructions match the pinned version.</violation>
</file>

<file name="gem/.devcontainer/Dockerfile">

<violation number="1" location="gem/.devcontainer/Dockerfile:2">
P3: The header comment requires this `RUBY_VERSION` to match `.ruby-version`, but 4.0.9 intentionally differs from the docs' 4.0.10. Add a comment explaining the lag so it is removed once the devcontainer image publishes 4.0.10.</violation>
</file>

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread gem/.tool-versions
@@ -1,2 +1,2 @@
ruby 3.4.7
ruby 4.0.10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: gem/.ruby-version still pins 3.3.3, so this update leaves conflicting default Ruby pins in gem/. Update .ruby-version to the intended version as part of this change.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At gem/.tool-versions, line 1:

<comment>`gem/.ruby-version` still pins 3.3.3, so this update leaves conflicting default Ruby pins in `gem/`. Update `.ruby-version` to the intended version as part of this change.</comment>

<file context>
@@ -1,2 +1,2 @@
-ruby 3.4.7
+ruby 4.0.10
 
</file context>

Comment thread audit/.tool-versions
@@ -1 +1 @@
ruby 3.4.7
ruby 4.0.10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This pin moves the audit toolchain to Ruby 4.0.10, but audit/README.md still lists Ruby 3.4 as the prerequisite in the Commands and Prerequisites sections. Update those references to 4.0 so setup instructions match the pinned version.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At audit/.tool-versions, line 1:

<comment>This pin moves the audit toolchain to Ruby 4.0.10, but `audit/README.md` still lists Ruby 3.4 as the prerequisite in the Commands and Prerequisites sections. Update those references to 4.0 so setup instructions match the pinned version.</comment>

<file context>
@@ -1 +1 @@
-ruby 3.4.7
+ruby 4.0.10
</file context>

@@ -1,5 +1,5 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
ARG RUBY_VERSION=3.4.7
ARG RUBY_VERSION=4.0.9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The header comment requires this RUBY_VERSION to match .ruby-version, but 4.0.9 intentionally differs from the docs' 4.0.10. Add a comment explaining the lag so it is removed once the devcontainer image publishes 4.0.10.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At gem/.devcontainer/Dockerfile, line 2:

<comment>The header comment requires this `RUBY_VERSION` to match `.ruby-version`, but 4.0.9 intentionally differs from the docs' 4.0.10. Add a comment explaining the lag so it is removed once the devcontainer image publishes 4.0.10.</comment>

<file context>
@@ -1,5 +1,5 @@
 # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
-ARG RUBY_VERSION=3.4.7
+ARG RUBY_VERSION=4.0.9
 FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
 
</file context>
Suggested change
ARG RUBY_VERSION=4.0.9
# Intentionally 4.0.9: the devcontainer image lacks 4.0.10; match .ruby-version once it is published.
ARG RUBY_VERSION=4.0.9

@cirdes
cirdes merged commit ee3bcf9 into main Nov 22, 2026
13 checks passed
@cirdes
cirdes deleted the chore/ruby-4.0 branch November 22, 2026 14:20
cirdes added a commit that referenced this pull request Nov 22, 2026
… devcontainer note

Follow-ups from the Cubic review of #676:

- gem/.ruby-version was still 3.3.3 while gem/.tool-versions says 4.0.10
- audit/README.md listed Ruby 3.4 as the prerequisite
- both devcontainer Dockerfiles explain why they stay on 4.0.9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cirdes added a commit that referenced this pull request Nov 22, 2026
* [Chore] Finish the Ruby 4.0.10 bump: gem/.ruby-version, audit README, devcontainer note

Follow-ups from the Cubic review of #676:

- gem/.ruby-version was still 3.3.3 while gem/.tool-versions says 4.0.10
- audit/README.md listed Ruby 3.4 as the prerequisite
- both devcontainer Dockerfiles explain why they stay on 4.0.9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [Documentation] Point agent docs and audit skills at Ruby 4.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant